package com.ourteam.system.dao;

import net.dao.BaseQueryBean;
import net.dao.BaseWhereCriterion;
import net.dao.IDataAccessInterface;

import org.apache.commons.lang.StringUtils;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * Template Name : DAO查询对象
 * Template Version : 1
 * Template Last Modfiy Date : Sat Aug 19 10:06:32 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:29
  * Warning ! This file will be overwrite when regenerate !
  *
 */
public class SysRoleModuleRelateDAOQueryBean extends BaseQueryBean {
    public SysRoleModuleRelateDAOQueryBean() {
        super();
    }

    public SysRoleModuleRelateDAOQueryBean(BaseQueryBean aQueryBean) {
        super(aQueryBean);
    }

    public SysRoleModuleRelateDAOQueryBean(BaseQueryBean aQueryBean,
        Map tableReplaceMap) {
        super(aQueryBean, tableReplaceMap);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();

        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }

        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        return new Criteria(this);
    }

    public void addIdSelectProperty() {
        addIdSelectProperty("id");
    }

    public void addIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.Id, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.Id, "id");
        }
    }

    public void addModuleIdSelectProperty() {
        addModuleIdSelectProperty("moduleId");
    }

    public void addModuleIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.ModuleId, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.ModuleId, "moduleId");
        }
    }

    public void addRemarksSelectProperty() {
        addRemarksSelectProperty("remarks");
    }

    public void addRemarksSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.Remarks, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.Remarks, "remarks");
        }
    }

    public void addRoleIdSelectProperty() {
        addRoleIdSelectProperty("roleId");
    }

    public void addRoleIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.RoleId, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.RoleId, "roleId");
        }
    }

    public void addStatusSelectProperty() {
        addStatusSelectProperty("status");
    }

    public void addStatusSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.Status, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.Status, "status");
        }
    }

    public void addParentModuleIdSelectProperty() {
        addParentModuleIdSelectProperty("parentModuleId");
    }

    public void addParentModuleIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.ParentModuleId, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.ParentModuleId,
                "parentModuleId");
        }
    }

    public void addDomainIdSelectProperty() {
        addDomainIdSelectProperty("domainId");
    }

    public void addDomainIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.DomainId, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.DomainId, "domainId");
        }
    }

    public void addModuleSortIndexSelectProperty() {
        addModuleSortIndexSelectProperty("moduleSortIndex");
    }

    public void addModuleSortIndexSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.ModuleSortIndex, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.ModuleSortIndex,
                "moduleSortIndex");
        }
    }

    public void addModuleCodeSelectProperty() {
        addModuleCodeSelectProperty("moduleCode");
    }

    public void addModuleCodeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.ModuleCode, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.ModuleCode, "moduleCode");
        }
    }

    public void addDomainCodeSelectProperty() {
        addDomainCodeSelectProperty("domainCode");
    }

    public void addDomainCodeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleModuleRelateDAO.DomainCode, aAlias);
        } else {
            addSelectProperty(ISysRoleModuleRelateDAO.DomainCode, "domainCode");
        }
    }

    public void addAllSelectProperties() {
        addIdSelectProperty();

        addModuleIdSelectProperty();

        addRemarksSelectProperty();

        addRoleIdSelectProperty();

        addStatusSelectProperty();

        addParentModuleIdSelectProperty();

        addDomainIdSelectProperty();

        addModuleSortIndexSelectProperty();

        addModuleCodeSelectProperty();

        addDomainCodeSelectProperty();
    }

    public static class Criteria extends BaseWhereCriterion<SysRoleModuleRelateDAOQueryBean> {
        protected Criteria(SysRoleModuleRelateDAOQueryBean aParentObject) {
            super(aParentObject);
        }

        public Criteria andIdIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.Id + " is null");

            return this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.Id + " is not null");

            return this;
        }

        public Criteria andIdIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.Id + " is not null AND " +
                ISysRoleModuleRelateDAO.Id + " <> ''");

            return this;
        }

        public Criteria andIdIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.Id + " is null OR " +
                ISysRoleModuleRelateDAO.Id + " = '')");

            return this;
        }

        public Criteria andIdEqualTo(long value) {
            return andIdEqualTo(Long.valueOf(value));
        }

        public Criteria andIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " = ", value, "id");

            return this;
        }

        public Criteria andIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Id);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotEqualTo(long value) {
            return andIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToOrIsNull(long value) {
            return andIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " is null OR " +
                ISysRoleModuleRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Id);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThan(long value) {
            return andIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " >", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Id);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(long value) {
            return andIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " >=", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Id);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThan(long value) {
            return andIdLessThan(Long.valueOf(value));
        }

        public Criteria andIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " <", value, "id");

            return this;
        }

        public Criteria andIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Id);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(long value) {
            return andIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " <=", value, "id");

            return this;
        }

        public Criteria andIdLessThanOrEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Id);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdIn(long[] values) {
            if (values.length == 1) {
                return andIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Id + " not in", values,
                    "id");

                return this;
            }
        }

        public Criteria andIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Id + " not in", values,
                    "id");

                return this;
            }
        }

        public Criteria andIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Id + " in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Id + " not in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " not in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andIdBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " not between", value1,
                value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.Id + " not between", value1,
                value2, "id");

            return this;
        }

        public Criteria andModuleIdIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " is null");

            return this;
        }

        public Criteria andModuleIdIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " is not null");

            return this;
        }

        public Criteria andModuleIdIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId +
                " is not null AND " + ISysRoleModuleRelateDAO.ModuleId +
                " <> ''");

            return this;
        }

        public Criteria andModuleIdIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.ModuleId +
                " is null OR " + ISysRoleModuleRelateDAO.ModuleId + " = '')");

            return this;
        }

        public Criteria andModuleIdEqualTo(long value) {
            return andModuleIdEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " = ", value,
                "moduleId");

            return this;
        }

        public Criteria andModuleIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdNotEqualTo(long value) {
            return andModuleIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " <>", value,
                "moduleId");

            return this;
        }

        public Criteria andModuleIdNotEqualToOrIsNull(long value) {
            return andModuleIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andModuleIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " is null OR " +
                ISysRoleModuleRelateDAO.ModuleId + " <>", value, "moduleId");

            return this;
        }

        public Criteria andModuleIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdGreaterThan(long value) {
            return andModuleIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andModuleIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " >", value,
                "moduleId");

            return this;
        }

        public Criteria andModuleIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdGreaterThanOrEqualTo(long value) {
            return andModuleIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " >=", value,
                "moduleId");

            return this;
        }

        public Criteria andModuleIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdLessThan(long value) {
            return andModuleIdLessThan(Long.valueOf(value));
        }

        public Criteria andModuleIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " <", value,
                "moduleId");

            return this;
        }

        public Criteria andModuleIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdLessThanOrEqualTo(long value) {
            return andModuleIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " <=", value,
                "moduleId");

            return this;
        }

        public Criteria andModuleIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdIn(long[] values) {
            if (values.length == 1) {
                return andModuleIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleId + " in", values,
                    "moduleId");

                return this;
            }
        }

        public Criteria andModuleIdNotIn(long[] values) {
            if (values.length == 1) {
                return andModuleIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleId + " not in",
                    values, "moduleId");

                return this;
            }
        }

        public Criteria andModuleIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModuleIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleId + " in", values,
                    "moduleId");

                return this;
            }
        }

        public Criteria andModuleIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModuleIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleId + " not in",
                    values, "moduleId");

                return this;
            }
        }

        public Criteria andModuleIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModuleIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleId + " in",
                    Arrays.asList(values), "moduleId");

                return this;
            }
        }

        public Criteria andModuleIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModuleIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleId + " not in",
                    Arrays.asList(values), "moduleId");

                return this;
            }
        }

        public Criteria andModuleIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleIdBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " between", value1,
                value2, "moduleId");

            return this;
        }

        public Criteria andModuleIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " between", value1,
                value2, "moduleId");

            return this;
        }

        public Criteria andModuleIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " not between",
                value1, value2, "moduleId");

            return this;
        }

        public Criteria andModuleIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleId + " not between",
                value1, value2, "moduleId");

            return this;
        }

        public Criteria andRemarksIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " is null");

            return this;
        }

        public Criteria andRemarksIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " is not null");

            return this;
        }

        public Criteria andRemarksIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " is not null AND " +
                ISysRoleModuleRelateDAO.Remarks + " <> ''");

            return this;
        }

        public Criteria andRemarksIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.Remarks +
                " is null OR " + ISysRoleModuleRelateDAO.Remarks + " = '')");

            return this;
        }

        public Criteria andRemarksEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " = ", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Remarks);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksNotEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " <>", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " is null OR " +
                ISysRoleModuleRelateDAO.Remarks + " <>", value, "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Remarks);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksGreaterThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " >", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Remarks);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " >=", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Remarks);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLessThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " <", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Remarks);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " <=", value,
                "remarks");

            return this;
        }

        public Criteria andRemarksLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Remarks);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " not like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Remarks + " in", values,
                    "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Remarks + " not in",
                    values, "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(String[] values) {
            if (values.length == 1) {
                return andRemarksEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Remarks + " in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(String[] values) {
            if (values.length == 1) {
                return andRemarksNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Remarks + " not in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " between", value1,
                value2, "remarks");

            return this;
        }

        public Criteria andRemarksNotBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.Remarks + " not between",
                value1, value2, "remarks");

            return this;
        }

        public Criteria andRoleIdIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " is null");

            return this;
        }

        public Criteria andRoleIdIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " is not null");

            return this;
        }

        public Criteria andRoleIdIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " is not null AND " +
                ISysRoleModuleRelateDAO.RoleId + " <> ''");

            return this;
        }

        public Criteria andRoleIdIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.RoleId + " is null OR " +
                ISysRoleModuleRelateDAO.RoleId + " = '')");

            return this;
        }

        public Criteria andRoleIdEqualTo(long value) {
            return andRoleIdEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " = ", value, "roleId");

            return this;
        }

        public Criteria andRoleIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.RoleId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdNotEqualTo(long value) {
            return andRoleIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " <>", value, "roleId");

            return this;
        }

        public Criteria andRoleIdNotEqualToOrIsNull(long value) {
            return andRoleIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andRoleIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " is null OR " +
                ISysRoleModuleRelateDAO.RoleId + " <>", value, "roleId");

            return this;
        }

        public Criteria andRoleIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.RoleId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdGreaterThan(long value) {
            return andRoleIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andRoleIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " >", value, "roleId");

            return this;
        }

        public Criteria andRoleIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.RoleId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdGreaterThanOrEqualTo(long value) {
            return andRoleIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " >=", value, "roleId");

            return this;
        }

        public Criteria andRoleIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.RoleId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdLessThan(long value) {
            return andRoleIdLessThan(Long.valueOf(value));
        }

        public Criteria andRoleIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " <", value, "roleId");

            return this;
        }

        public Criteria andRoleIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.RoleId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdLessThanOrEqualTo(long value) {
            return andRoleIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andRoleIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " <=", value, "roleId");

            return this;
        }

        public Criteria andRoleIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.RoleId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRoleIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdIn(long[] values) {
            if (values.length == 1) {
                return andRoleIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.RoleId + " in", values,
                    "roleId");

                return this;
            }
        }

        public Criteria andRoleIdNotIn(long[] values) {
            if (values.length == 1) {
                return andRoleIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.RoleId + " not in",
                    values, "roleId");

                return this;
            }
        }

        public Criteria andRoleIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andRoleIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.RoleId + " in", values,
                    "roleId");

                return this;
            }
        }

        public Criteria andRoleIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andRoleIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.RoleId + " not in",
                    values, "roleId");

                return this;
            }
        }

        public Criteria andRoleIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andRoleIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.RoleId + " in",
                    Arrays.asList(values), "roleId");

                return this;
            }
        }

        public Criteria andRoleIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andRoleIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.RoleId + " not in",
                    Arrays.asList(values), "roleId");

                return this;
            }
        }

        public Criteria andRoleIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRoleIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRoleIdBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " between", value1,
                value2, "roleId");

            return this;
        }

        public Criteria andRoleIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " between", value1,
                value2, "roleId");

            return this;
        }

        public Criteria andRoleIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " not between",
                value1, value2, "roleId");

            return this;
        }

        public Criteria andRoleIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.RoleId + " not between",
                value1, value2, "roleId");

            return this;
        }

        public Criteria andStatusIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.Status + " is null");

            return this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.Status + " is not null");

            return this;
        }

        public Criteria andStatusIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.Status + " is not null AND " +
                ISysRoleModuleRelateDAO.Status + " <> ''");

            return this;
        }

        public Criteria andStatusIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.Status + " is null OR " +
                ISysRoleModuleRelateDAO.Status + " = '')");

            return this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " = ", value, "status");

            return this;
        }

        public Criteria andStatusEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Status);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " is null OR " +
                ISysRoleModuleRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Status);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " >", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Status);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " >=", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Status);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " <", value, "status");

            return this;
        }

        public Criteria andStatusLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Status);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " <=", value, "status");

            return this;
        }

        public Criteria andStatusLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.Status);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.Status + " like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.Status + " not like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Status + " in", values,
                    "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Status + " not in",
                    values, "status");

                return this;
            }
        }

        public Criteria andStatusIn(String[] values) {
            if (values.length == 1) {
                return andStatusEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Status + " in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(String[] values) {
            if (values.length == 1) {
                return andStatusNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.Status + " not in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " between", value1,
                value2, "status");

            return this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.Status + " not between",
                value1, value2, "status");

            return this;
        }

        public Criteria andParentModuleIdIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " is null");

            return this;
        }

        public Criteria andParentModuleIdIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                " is not null");

            return this;
        }

        public Criteria andParentModuleIdIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                " is not null AND " + ISysRoleModuleRelateDAO.ParentModuleId +
                " <> ''");

            return this;
        }

        public Criteria andParentModuleIdIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.ParentModuleId +
                " is null OR " + ISysRoleModuleRelateDAO.ParentModuleId +
                " = '')");

            return this;
        }

        public Criteria andParentModuleIdEqualTo(long value) {
            return andParentModuleIdEqualTo(Long.valueOf(value));
        }

        public Criteria andParentModuleIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " = ", value,
                "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ParentModuleId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentModuleIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdNotEqualTo(long value) {
            return andParentModuleIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andParentModuleIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " <>", value,
                "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdNotEqualToOrIsNull(long value) {
            return andParentModuleIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andParentModuleIdNotEqualToOrIsNull(
            java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                " is null OR " + ISysRoleModuleRelateDAO.ParentModuleId +
                " <>", value, "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ParentModuleId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentModuleIdNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdGreaterThan(long value) {
            return andParentModuleIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andParentModuleIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " >", value,
                "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ParentModuleId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentModuleIdGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdGreaterThanOrEqualTo(long value) {
            return andParentModuleIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andParentModuleIdGreaterThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " >=", value,
                "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ParentModuleId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentModuleIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdLessThan(long value) {
            return andParentModuleIdLessThan(Long.valueOf(value));
        }

        public Criteria andParentModuleIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " <", value,
                "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ParentModuleId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentModuleIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdLessThanOrEqualTo(long value) {
            return andParentModuleIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andParentModuleIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " <=", value,
                "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ParentModuleId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentModuleIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdIn(long[] values) {
            if (values.length == 1) {
                return andParentModuleIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " in",
                    values, "parentModuleId");

                return this;
            }
        }

        public Criteria andParentModuleIdNotIn(long[] values) {
            if (values.length == 1) {
                return andParentModuleIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                    " not in", values, "parentModuleId");

                return this;
            }
        }

        public Criteria andParentModuleIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andParentModuleIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " in",
                    values, "parentModuleId");

                return this;
            }
        }

        public Criteria andParentModuleIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andParentModuleIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                    " not in", values, "parentModuleId");

                return this;
            }
        }

        public Criteria andParentModuleIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andParentModuleIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " in",
                    Arrays.asList(values), "parentModuleId");

                return this;
            }
        }

        public Criteria andParentModuleIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andParentModuleIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                    " not in", Arrays.asList(values), "parentModuleId");

                return this;
            }
        }

        public Criteria andParentModuleIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentModuleIdBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " between",
                value1, value2, "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId + " between",
                value1, value2, "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                " not between", value1, value2, "parentModuleId");

            return this;
        }

        public Criteria andParentModuleIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ParentModuleId +
                " not between", value1, value2, "parentModuleId");

            return this;
        }

        public Criteria andDomainIdIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " is null");

            return this;
        }

        public Criteria andDomainIdIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " is not null");

            return this;
        }

        public Criteria andDomainIdIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.DomainId +
                " is not null AND " + ISysRoleModuleRelateDAO.DomainId +
                " <> ''");

            return this;
        }

        public Criteria andDomainIdIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.DomainId +
                " is null OR " + ISysRoleModuleRelateDAO.DomainId + " = '')");

            return this;
        }

        public Criteria andDomainIdEqualTo(long value) {
            return andDomainIdEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " = ", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdNotEqualTo(long value) {
            return andDomainIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " <>", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdNotEqualToOrIsNull(long value) {
            return andDomainIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andDomainIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " is null OR " +
                ISysRoleModuleRelateDAO.DomainId + " <>", value, "domainId");

            return this;
        }

        public Criteria andDomainIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdGreaterThan(long value) {
            return andDomainIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andDomainIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " >", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdGreaterThanOrEqualTo(long value) {
            return andDomainIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " >=", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdLessThan(long value) {
            return andDomainIdLessThan(Long.valueOf(value));
        }

        public Criteria andDomainIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " <", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdLessThanOrEqualTo(long value) {
            return andDomainIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andDomainIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " <=", value,
                "domainId");

            return this;
        }

        public Criteria andDomainIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdIn(long[] values) {
            if (values.length == 1) {
                return andDomainIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainId + " in", values,
                    "domainId");

                return this;
            }
        }

        public Criteria andDomainIdNotIn(long[] values) {
            if (values.length == 1) {
                return andDomainIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainId + " not in",
                    values, "domainId");

                return this;
            }
        }

        public Criteria andDomainIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andDomainIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainId + " in", values,
                    "domainId");

                return this;
            }
        }

        public Criteria andDomainIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andDomainIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainId + " not in",
                    values, "domainId");

                return this;
            }
        }

        public Criteria andDomainIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andDomainIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainId + " in",
                    Arrays.asList(values), "domainId");

                return this;
            }
        }

        public Criteria andDomainIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andDomainIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainId + " not in",
                    Arrays.asList(values), "domainId");

                return this;
            }
        }

        public Criteria andDomainIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainIdBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " between", value1,
                value2, "domainId");

            return this;
        }

        public Criteria andDomainIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " between", value1,
                value2, "domainId");

            return this;
        }

        public Criteria andDomainIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " not between",
                value1, value2, "domainId");

            return this;
        }

        public Criteria andDomainIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.DomainId + " not between",
                value1, value2, "domainId");

            return this;
        }

        public Criteria andModuleSortIndexIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " is null");

            return this;
        }

        public Criteria andModuleSortIndexIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                " is not null");

            return this;
        }

        public Criteria andModuleSortIndexIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                " is not null AND " + ISysRoleModuleRelateDAO.ModuleSortIndex +
                " <> ''");

            return this;
        }

        public Criteria andModuleSortIndexIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.ModuleSortIndex +
                " is null OR " + ISysRoleModuleRelateDAO.ModuleSortIndex +
                " = '')");

            return this;
        }

        public Criteria andModuleSortIndexEqualTo(long value) {
            return andModuleSortIndexEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleSortIndexEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " = ",
                value, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleSortIndex);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleSortIndexEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexNotEqualTo(long value) {
            return andModuleSortIndexNotEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleSortIndexNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " <>",
                value, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexNotEqualToOrIsNull(long value) {
            return andModuleSortIndexNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andModuleSortIndexNotEqualToOrIsNull(
            java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                " is null OR " + ISysRoleModuleRelateDAO.ModuleSortIndex +
                " <>", value, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleSortIndex);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleSortIndexNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexGreaterThan(long value) {
            return andModuleSortIndexGreaterThan(Long.valueOf(value));
        }

        public Criteria andModuleSortIndexGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " >", value,
                "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleSortIndex);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleSortIndexGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexGreaterThanOrEqualTo(long value) {
            return andModuleSortIndexGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleSortIndexGreaterThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " >=",
                value, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleSortIndex);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleSortIndexGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexLessThan(long value) {
            return andModuleSortIndexLessThan(Long.valueOf(value));
        }

        public Criteria andModuleSortIndexLessThan(java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " <", value,
                "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleSortIndex);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleSortIndexLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexLessThanOrEqualTo(long value) {
            return andModuleSortIndexLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andModuleSortIndexLessThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " <=",
                value, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleSortIndex);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleSortIndexLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexIn(long[] values) {
            if (values.length == 1) {
                return andModuleSortIndexEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " in",
                    values, "moduleSortIndex");

                return this;
            }
        }

        public Criteria andModuleSortIndexNotIn(long[] values) {
            if (values.length == 1) {
                return andModuleSortIndexNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                    " not in", values, "moduleSortIndex");

                return this;
            }
        }

        public Criteria andModuleSortIndexIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModuleSortIndexEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " in",
                    values, "moduleSortIndex");

                return this;
            }
        }

        public Criteria andModuleSortIndexNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andModuleSortIndexNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                    " not in", values, "moduleSortIndex");

                return this;
            }
        }

        public Criteria andModuleSortIndexIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModuleSortIndexEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " in",
                    Arrays.asList(values), "moduleSortIndex");

                return this;
            }
        }

        public Criteria andModuleSortIndexNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andModuleSortIndexNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                    " not in", Arrays.asList(values), "moduleSortIndex");

                return this;
            }
        }

        public Criteria andModuleSortIndexIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleSortIndexBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " between",
                value1, value2, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex + " between",
                value1, value2, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexNotBetween(long value1, long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                " not between", value1, value2, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleSortIndexNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleSortIndex +
                " not between", value1, value2, "moduleSortIndex");

            return this;
        }

        public Criteria andModuleCodeIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " is null");

            return this;
        }

        public Criteria andModuleCodeIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " is not null");

            return this;
        }

        public Criteria andModuleCodeIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode +
                " is not null AND " + ISysRoleModuleRelateDAO.ModuleCode +
                " <> ''");

            return this;
        }

        public Criteria andModuleCodeIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.ModuleCode +
                " is null OR " + ISysRoleModuleRelateDAO.ModuleCode + " = '')");

            return this;
        }

        public Criteria andModuleCodeEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " = ", value,
                "moduleCode");

            return this;
        }

        public Criteria andModuleCodeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleCode);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleCodeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeNotEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " <>", value,
                "moduleCode");

            return this;
        }

        public Criteria andModuleCodeNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " is null OR " +
                ISysRoleModuleRelateDAO.ModuleCode + " <>", value, "moduleCode");

            return this;
        }

        public Criteria andModuleCodeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleCode);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleCodeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeGreaterThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " >", value,
                "moduleCode");

            return this;
        }

        public Criteria andModuleCodeGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleCode);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleCodeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " >=", value,
                "moduleCode");

            return this;
        }

        public Criteria andModuleCodeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleCode);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleCodeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeLessThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " <", value,
                "moduleCode");

            return this;
        }

        public Criteria andModuleCodeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleCode);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleCodeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " <=", value,
                "moduleCode");

            return this;
        }

        public Criteria andModuleCodeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.ModuleCode);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModuleCodeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " like",
                buffer.toString(), "moduleCode");

            return this;
        }

        public Criteria andModuleCodeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " not like",
                buffer.toString(), "moduleCode");

            return this;
        }

        public Criteria andModuleCodeIn(List<String> values) {
            if (values.size() == 1) {
                return andModuleCodeEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " in",
                    values, "moduleCode");

                return this;
            }
        }

        public Criteria andModuleCodeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andModuleCodeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " not in",
                    values, "moduleCode");

                return this;
            }
        }

        public Criteria andModuleCodeIn(String[] values) {
            if (values.length == 1) {
                return andModuleCodeEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " in",
                    Arrays.asList(values), "moduleCode");

                return this;
            }
        }

        public Criteria andModuleCodeNotIn(String[] values) {
            if (values.length == 1) {
                return andModuleCodeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " not in",
                    Arrays.asList(values), "moduleCode");

                return this;
            }
        }

        public Criteria andModuleCodeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModuleCodeBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " between",
                value1, value2, "moduleCode");

            return this;
        }

        public Criteria andModuleCodeNotBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.ModuleCode + " not between",
                value1, value2, "moduleCode");

            return this;
        }

        public Criteria andDomainCodeIsNull() {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " is null");

            return this;
        }

        public Criteria andDomainCodeIsNotNull() {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " is not null");

            return this;
        }

        public Criteria andDomainCodeIsNotEmpty() {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode +
                " is not null AND " + ISysRoleModuleRelateDAO.DomainCode +
                " <> ''");

            return this;
        }

        public Criteria andDomainCodeIsEmpty() {
            addCriterion("(" + ISysRoleModuleRelateDAO.DomainCode +
                " is null OR " + ISysRoleModuleRelateDAO.DomainCode + " = '')");

            return this;
        }

        public Criteria andDomainCodeEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " = ", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainCode);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeNotEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " <>", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " is null OR " +
                ISysRoleModuleRelateDAO.DomainCode + " <>", value, "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainCode);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeGreaterThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " >", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainCode);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " >=", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainCode);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeLessThan(String value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " <", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainCode);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " <=", value,
                "domainCode");

            return this;
        }

        public Criteria andDomainCodeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleModuleRelateDAO.DomainCode);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDomainCodeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " like",
                buffer.toString(), "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " not like",
                buffer.toString(), "domainCode");

            return this;
        }

        public Criteria andDomainCodeIn(List<String> values) {
            if (values.size() == 1) {
                return andDomainCodeEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainCode + " in",
                    values, "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andDomainCodeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainCode + " not in",
                    values, "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeIn(String[] values) {
            if (values.length == 1) {
                return andDomainCodeEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainCode + " in",
                    Arrays.asList(values), "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeNotIn(String[] values) {
            if (values.length == 1) {
                return andDomainCodeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleModuleRelateDAO.DomainCode + " not in",
                    Arrays.asList(values), "domainCode");

                return this;
            }
        }

        public Criteria andDomainCodeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDomainCodeBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " between",
                value1, value2, "domainCode");

            return this;
        }

        public Criteria andDomainCodeNotBetween(String value1, String value2) {
            addCriterion(ISysRoleModuleRelateDAO.DomainCode + " not between",
                value1, value2, "domainCode");

            return this;
        }
    }
}
